
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>书城项目</title>
    <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/css/user.css">

    <style type="text/css">
        h1 {
            text-align: center;
            margin-top: 200px;
        }

        h1 a {
            color:red;
        }
    </style>
</head>


<body>
    <div id="header">
        <img class="logo_img" alt="" src="/static/img/logouestc_2.png" >

        <c:if test ="${empty sessionScope.username }">

            <a href="/client/user/login.jsp">登录</a>
            <a href="/pages/cart/cart.jsp">购物车</a>
            <a href="/pages/order/order.jsp">我的订单</a>
            <a href="/client/manager/manager.jsp">后台管理系统</a>
        </c:if>

        <c:if test ="${not empty sessionScope.username }">
            <span>欢迎<span class="um_span">${sessionScope.username}</span>光临成电书城</span>
            <a href="/pages/cart/cart.jsp">购物车</a>
            <a href="pages/order/order.jsp">我的订单</a>
            <a href="/client/manager/manager.jsp">后台管理系统</a>
            <a href="/client/UserServlet?action=logout">注销</a>&nbsp;&nbsp;
            <a href="http://localhost:8080/client/manager/book_manager.jsp">返回</a>
        </c:if>

    </div>

    <div id="main">

        <h1>欢迎回来 书城 </h1>
        <c:if test ="${not empty sessionScope.username }">

            <c:if test="${empty sessionScope.cart.items}">
                <h1 align="center">
                    <tr>
                        <td colspan="5"><a href="client/bookServlet?action=page">您购物车中有0件商品！快去浏览商品吧！</a></td>
                    </tr>
                </h1>

            </c:if>

            <c:if test="${not empty sessionScope.cart.items}">
                <h1 align="center">
                    <tr align="center">
                        <td colspan="5">您购物车中有${sessionScope.cart.totalCount}件商品,您最新购买的书是: ${sessionScope.lastName}！</a></td>
                    </tr>
                </h1>

            </c:if>


        </c:if>


    </div>
</body>
</html>


